import random

while True:
    player = int(input("输入你猜的拳(0: 石头 1: 剪刀 2: 布)： "))
    computer = random.randint(0, 2)
    print(computer)

    if player == 0 or player == 1 or player == 2:
        if player == 0 and computer == 1:
            print('你赢了')
        elif player == 1 and computer == 2:
            print('你赢了')
        elif player == 2 and computer == 0:
            print('你赢了')
        elif player == computer:
            print('平局')
        else:
            print('你输了')
    else:
        print('瞎输啊！')
